<template>
  <el-card>
    <el-input v-model="test" @input="handleChange" />
    <el-input-number v-model="test" @change="handleChange2" />
    <CommonList :list-config="baseListConfig" :list="baseList" />
    <el-tabs v-model="activeName" style="margin-top: 60px" @tab-click="handleClick">
      <el-tab-pane label="逐个定价" name="first">
        <div>
          <CommonEditList :list="list" :column-list="oneByOneListConfig.columns" />
          <el-button @click="handleOneByOnePrice">确定</el-button>
        </div>
      </el-tab-pane>
      <el-tab-pane label="统一定价" name="second">
        <CommonList :list-config="listConfig" :list="list" />
        <CommonEditList :list="list" :column-list="uniformListConfig.columns" :title="uniformListConfig.title" />
        <el-button @click="handleUniformPrice">确定</el-button>
      </el-tab-pane>
    </el-tabs>
  </el-card>
</template>

<script>
import CommonList from '@/components/Custom/CommonList'
import CommonEditList from '@/components/Custom/CommonEditList'
import getBaseListParams from '../detail/getBaseListParams'
import getOneByOneProdListParams from './getOneByOneProdListParams'
import getProdListParams from './getProdListParams'
import getUniformPriceListParams from './getUniformPriceListParams'
export default {
  name: 'ChannelPrice',
  components: {
    CommonList,
    CommonEditList
  },
  mixins: [getBaseListParams, getOneByOneProdListParams, getUniformPriceListParams, getProdListParams],
  data() {
    return {
      activeName: 'first',
      baseList: [],
      list: [{ id: 1, discount: 100 }],
      test: 1
    }
  },
  methods: {
    handleClick(tab, event) {
      // console.log(event)
    },
    handleOneByOnePrice() {
      console.log(this.list)
    },
    handleUniformPrice() {
      console.log(this.list)
    },
    handleChange() {
      console.log('handleChange')
    },
    handleChange2() {
      console.log('handleChange2')
    }
  }
}
</script>

<style scoped>

</style>
